<div style="margin-bottom: 16px;">
  <span>城市信息管理</span>
  <span style="margin-left: 8px;" *ngIf="checkedNumber">已选择 {{checkedNumber}} 条</span>
</div>
<nz-table
  (nzCurrentPageDataChange)="currentPageDataChange($event)"
  #rowSelectionTable
  [nzData]="dataSet"
>
  <thead>
    <tr>
      <th nzShowCheckbox [(nzChecked)]="allChecked" [nzIndeterminate]="indeterminate" (nzCheckedChange)="checkAll($event)"></th>
      <th>城市编号</th>  
      <th>城市名称</th>
      <th>城市等级</th>
      <th>城市员工数</th>
      <th>城市状态</th>
      <th>操作</th>
    </tr>
  </thead>
  <tbody>
    <tr *ngFor="let data of rowSelectionTable.data">
      <td nzShowCheckbox  [(nzChecked)]="data.checked"  (nzCheckedChange)="refreshStatus()"></td>
      <td>{{data.cityNo}}</td>
      <td>{{data.cityName}}</td>
      <td>{{data.cityLevel}}</td>
      <td>{{data.cityStaffNum}}</td>
      <td>{{data.cityStatus}}</td>
      <td><i class="anticon anticon-edit iconEdit" title="修改" (click)="editStaff(data)"></i></td>
    </tr>
  </tbody>
</nz-table>
<nz-modal [(nzVisible)]="isVisible" nzTitle="" nzWrapClassName="vertical-center-modal" nzWidth="350"  nzClosable="false" (nzOnCancel)="citycalcel()" (nzOnOk)="citySave()">
  <nz-input-group [nzSuffix]="NoTemplate" nzPrefixIcon="anticon anticon-bars">
    <input type="text" nz-input placeholder="请输入城市编号" [(ngModel)]="cityNo">
  </nz-input-group>
  <nz-input-group [nzSuffix]="NameTemplate" class="marginTop" nzPrefixIcon="anticon anticon-flag">
    <input type="text" nz-input placeholder="请输入城市名称" [(ngModel)]="cityName">
  </nz-input-group>
    <nz-select style="width: 302px;" [(ngModel)]="citySelect" class="marginTop" nzAllowClear nzPlaceHolder="请选择城市等级">
      <nz-option nzValue="一级" nzLabel="一级"></nz-option>
      <nz-option nzValue="二级" nzLabel="二级"></nz-option>
      <nz-option nzValue="三级" nzLabel="三级"></nz-option>
    </nz-select>
  <nz-input-group [nzSuffix]="staffTemplate" class="marginTop" nzPrefixIcon="anticon anticon-usergroup-add">
    <input type="text" nz-input placeholder="请输入城市员工数" [(ngModel)]="cityStaffNum">
  </nz-input-group>
  <nz-input-group [nzSuffix]="RevenueTemplate" class="marginTop" nzPrefixIcon="anticon anticon-pay-circle-o">
    <input type="text" nz-input placeholder="请输入城市当前营收额" [(ngModel)]="cityRevenue">
  </nz-input-group>
  <nz-input-group [nzSuffix]="staffTemplate" class="marginTop" nzPrefixIcon="anticon anticon-pay-circle-o">
    <input type="text" nz-input placeholder="请输入城市当前成本" [(ngModel)]="cityCost">
  </nz-input-group>
  <nz-input-group [nzSuffix]="statusTemplate" class="marginTop" nzPrefixIcon="anticon anticon-fork">
    <input type="text" nz-input placeholder="请输入城市状态" [(ngModel)]="cityStatus">
  </nz-input-group>
  <ng-template #NoTemplate><i class="anticon anticon-close-circle" (click)="cityName=null" *ngIf="cityNo"></i></ng-template>
  <ng-template #NameTemplate><i class="anticon anticon-close-circle" (click)="cityName=null" *ngIf="cityName"></i></ng-template>
  <ng-template #staffTemplate><i class="anticon anticon-close-circle" (click)="cityName=null" *ngIf="cityStaffNum"></i></ng-template>
  <ng-template #statusTemplate><i class="anticon anticon-close-circle" (click)="cityName=null" *ngIf="cityStatus"></i></ng-template>
  <ng-template #RevenueTemplate><i class="anticon anticon-close-circle" (click)="cityRevenue=null" *ngIf="cityRevenue"></i></ng-template>
  <ng-template #CostTemplate><i class="anticon anticon-close-circle" (click)="cityCost=null" *ngIf="cityCost"></i></ng-template>
</nz-modal>
<div style="margin-top: 16px;">
  <button nz-button nzType="primary" nzGhost  (click)="showModal()"><i class="anticon anticon-plus"></i>新增城市</button>
  <button style="margin-left: 16px;" nz-button (click)="delCity()" nzType="danger" nzGhost><i class="anticon anticon-delete"></i>删除/批量删除</button>
</div>